package com.gopay.common.constants.bank;

import com.gopay.common.constants.logging.BussinessLogInfo;

public enum BocomOrderStatus {
		B2C_ORDERSTATE_REVOCATION("2","已撤销"),
		B2C_ORDERSTATE_RETURN_PROCESSING("4","退货处理中"),
		B2C_ORDERSTATE_PART_RETURNS("3","部分退货"),
		B2C_ORDERSTATE_ALL("0","所有"),
		B2C_ORDERSTATE_RETURNS("5","全部退货"),
		B2B_ORDERSTATE_ORADERCREATE("000","订单生成"),
		B2B_ORDERSTATE_WAIT("010","等待付款"),
		B2B_ORDERSTATE_SUCCESS("020","已付款"),
		B2B_ORDERSTATE_MARGINPAY("030","银行处理中"),
		B2B_ORDERSTATE_GOODSSENT("050","已发货"),
		B2B_ORDERSTATE_ORDERCANCEL("110","订单撤销"),
		B2B_ORDERSTATE_REFUND("120","已退款"),
		;
	    private String key;
	    public String value;

	    BocomOrderStatus(String key, String value) {
	        this.key = key;
	        this.value = value;
	    }

	    // 普通方法
	    public static String getName(String key) {
	        for (BussinessLogInfo info : BussinessLogInfo.values()) {
	            if (info.getKey().equals(key)) {
	                return info.value;
	            }
	        }
	        return "状态不明";
	    }

	    @Override
	    public String toString() {
	        return this.value;
	    }

	    /**
	     * @return the key
	     */
	    public String getKey() {
	        return key;
	    }

	    /**
	     * @param key the key to set
	     */
	    public void setKey(String key) {
	        this.key = key;
	    }

	    /**
	     * @return the value
	     */
	    public String getValue() {
	        return value;
	    }

	    /**
	     * @param value the value to set
	     */
	    public void setValue(String value) {
	        this.value = value;
	    }
}
